package cvut.fit.dpo.arithmetic.iterator;

import java.util.Iterator;

import cvut.fit.dpo.arithmetic.elements.ExpressionElement;

public abstract class AbstractIterator implements Iterator<ExpressionElement> {

	final private Iterator<ExpressionElement> it;
	
	protected AbstractIterator() {
		it = createIterator();
	}
	
	protected abstract Iterator<ExpressionElement> createIterator();
	
	@Override
	public boolean hasNext() {
		return it.hasNext();
	}

	@Override
	public ExpressionElement next() {
		return it.next();
	}

	@Override
	public void remove() {
		throw new UnsupportedOperationException();
	}

}
